package com.chenxingnet.dao;

import com.chenxingnet.dto.Accident;
import com.chenxingnet.dto.AccidentExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface AccidentMapper {
    int countByExample(AccidentExample example);

    int deleteByExample(AccidentExample example);

    int deleteByPrimaryKey(Integer acid);

    int insert(Accident record);

    int insertSelective(Accident record);

    List<Accident> selectByExample(AccidentExample example);

    Accident selectByPrimaryKey(Integer acid);

    int updateByExampleSelective(@Param("record") Accident record, @Param("example") AccidentExample example);

    int updateByExample(@Param("record") Accident record, @Param("example") AccidentExample example);

    int updateByPrimaryKeySelective(Accident record);

    int updateByPrimaryKey(Accident record);
    
    long getCount(@Param("deptid")Integer deptid); 
    
    List<Accident> selectAllByCount(@Param("deptid")int deptid,@Param("startPos")int startPos,@Param("pageSize")int pageSize);

	List<Accident> getAccidentByName(@Param("pageSize")int pageSize,@Param("name")String name);

	int getAccidentByNameCount(@Param("name")String name);
	
	int updateAccById(@Param("acid")Integer acid);
	
	List<Accident> selectAcc(@Param("souacc") String souacc,@Param("deptid") Integer deptid);
	
	List<Accident> selectAccByDeptid(@Param("deptid") Integer deptid);
	
}